const chroma = require('chroma-js')

function validateColor(element, expectedHex) {
  const computedColor = getComputedStyle(element).getPropertyValue('color')
  return chroma(computedColor).hex() === expectedHex
}